<html>
<head><meta charset="utf-8"><title>Plot callgraphs from rustc · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Plot.20callgraphs.20from.20rustc.html">Plot callgraphs from rustc</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="148142588"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Plot%20callgraphs%20from%20rustc/near/148142588" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Luca Barbato <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Plot.20callgraphs.20from.20rustc.html#148142588">(Nov 21 2018 at 23:03)</a>:</h4>
<p>Is there already something that prints the callgraphs in something graphviz could consume?</p>



<a name="148158768"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Plot%20callgraphs%20from%20rustc/near/148158768" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Plot.20callgraphs.20from.20rustc.html#148158768">(Nov 22 2018 at 07:24)</a>:</h4>
<p>I don't think callgraphs are sth we have code to emit. Would be a nice feature of rustdoc though</p>



<a name="148161177"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Plot%20callgraphs%20from%20rustc/near/148161177" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Luca Barbato <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Plot.20callgraphs.20from.20rustc.html#148161177">(Nov 22 2018 at 08:26)</a>:</h4>
<p>do we have ast-view though?</p>



<a name="148161606"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Plot%20callgraphs%20from%20rustc/near/148161606" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Plot.20callgraphs.20from.20rustc.html#148161606">(Nov 22 2018 at 08:39)</a>:</h4>
<p>ast-view?</p>



<a name="148167841"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Plot%20callgraphs%20from%20rustc/near/148167841" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Luca Barbato <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Plot.20callgraphs.20from.20rustc.html#148167841">(Nov 22 2018 at 10:47)</a>:</h4>
<p>something such as <a href="https://stackoverflow.com/questions/18560019/how-to-view-clang-ast#18589704" target="_blank" title="https://stackoverflow.com/questions/18560019/how-to-view-clang-ast#18589704">https://stackoverflow.com/questions/18560019/how-to-view-clang-ast#18589704</a></p>



<a name="148169994"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Plot%20callgraphs%20from%20rustc/near/148169994" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Plot.20callgraphs.20from.20rustc.html#148169994">(Nov 22 2018 at 11:34)</a>:</h4>
<p>I think an ast-view should be a stable tool built on top of <code>syn</code>, not some compiler-magic</p>



<a name="148170024"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Plot%20callgraphs%20from%20rustc/near/148170024" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Plot.20callgraphs.20from.20rustc.html#148170024">(Nov 22 2018 at 11:35)</a>:</h4>
<p>call graphs require more info, but it should be fairly simple to write a custom driver that dumps a .dot file for every function in a crate</p>



<a name="148173480"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Plot%20callgraphs%20from%20rustc/near/148173480" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Luca Barbato <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Plot.20callgraphs.20from.20rustc.html#148173480">(Nov 22 2018 at 12:53)</a>:</h4>
<p>Yes, I wouldn't want to duplicate effort and I hoped something would be available since everybody likes pretty graphs :)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>